The Floyd-Warshall algorithm on graphs with negative cycles
نویسنده
چکیده
The Floyd-Warshall algorithm is a simple and widely used algorithm to compute shortest paths between all pairs of vertices in an edge weighted directed graph. It can also be used to detect the presence of negative cycles. We will show that for this task many existing implementations of the Floyd-Warshall algorithm will fail because exponentially large numbers can appear during its execution.
منابع مشابه
The Floyd-Warshall Algorithm for Shortest Paths
The Floyd-Warshall algorithm [Flo62, Roy59, War62] is a classic dynamic programming algorithm to compute the length of all shortest paths between any two vertices in a graph (i.e. to solve the all-pairs shortest path problem, or APSP for short). Given a representation of the graph as a matrix of weights M , it computes another matrix M ′ which represents a graph with the same path lengths and c...
متن کاملUsing basis dependence distance vectors in the modified Floyd-Warshall algorithm
In this paper, we present a modified Floyd–Warshall algorithm, where the most time-consumingpart—calculating transitive closure describing self-dependences for each loop statement—is computed applying basis dependence distance vectors derived from all vectors describing self-dependences. We demonstrate that the presented approach reduces the transitive closure calculation time for parameterized...
متن کاملA Parallel Recursive Approach for Solving All Pairs Shortest Path Problem on GPU using OpenCL
All-pairs shortest path problem(APSP) finds a large number of practical applications in real world. We owe to present a highly parallel and recursive solution for solving APSP problem based on Kleene’s algorithm. The proposed parallel approach for APSP is implemented using an open standard framework OpenCL which provides a development environment for utilizing massive parallel capabilities of M...
متن کاملTransitive closure and metric inequality of weighted graphs: detecting protein interaction modules using cliques
We study transitivity properties of edge weights in complex networks. We show that enforcing transitivity leads to a transitivity inequality which is equivalent to ultra-metric inequality. This can be used to define transitive closure on weighted undirected graphs, which can be computed using a modified Floyd-Warshall algorithm. These new concepts are extended to dissimilarity graphs and triang...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Inf. Process. Lett.
دوره 110 شماره
صفحات -
تاریخ انتشار 2010